<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet"
	type="text/css" />
<link href="css/pagination.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>业务报表</title>
<style>
.title {
	display: block;
	background: #5a98de;
	line-height: 31px;
	float: left;
	color: white;
	width: 95px;
	text-align: center;
}

.title:hover {
	text-decoration: none;
	color: white;
}
</style>
</head>

<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i> 首页
		 <span class="c-gray en">&gt;</span>配送员结算列表
	
		<a class="btn btn-success btn-refresh radius r mr-20"
			style="line-height:1.6em;margin-top:3px" onclick="javascript:location.replace(location.href);"
			href="javascript:location.replace(location.href);" title="刷新">刷新</a>
	</nav>
	
	<div class="pd-20">
	  
		<div class="cl pd-5 bg-1 bk-gray"> 
		<form action="<%=path%>/backstage/shipper_month_statistic_list" method="get" class="form form-horizontal" id="search-form" onsubmit="beforSubmit()">
			<div class="text-c"> 
				<div class="row cl">
					<label class="form-label col-1">配送员账号：</label>
					<div class="formControls col-2">
					<input type="text" name="c_mob" value="${conditions.c_mob}"  id="c_mob" placeholder="配送员账号" class="input-text col-2">
					</div>
					
					<label class="form-label col-2">配送员姓名：</label>
					<div class="formControls col-2">
					<input type="text" name="c_tname" value="${conditions.c_tname}"  id="c_mob" placeholder="配送员姓名" class="input-text col-2">
					</div>
					
					<label class="form-label col-2">分站名称：</label>
					<div class="formControls col-2">
					<input type="text" name="cityName" value="${conditions.cityName}"  id="c_mob" placeholder="分站名称" class="input-text col-2">
					</div>
				</div>
				
				<div class="row cl">
					<label class="form-label col-1">结算日期：</label>
					<div class="formControls col-2">
						<input type="text"  name="finish_time" readonly="readonly"  onfocus="WdatePicker({maxDate:'%y-%M-{%d}'})"  value="${conditions.finish_time}"  id="datemin" class="input-text Wdate" >
					</div>
				</div>
				<div class="mt-10"></div>
				
				<div class="row cl">
					<button name="" id="" class="btn btn-success" style="border-radius:5px;float:right;" type="submit">
						 查询
					</button>
					<div style="width:10px;height:5px;float:right;"></div>
					<button name="" onclick="theReset();" id="" class="btn btn-success" style="border-radius:5px;float:right;" >
						 重置
					</button>
				</div>
				
			</div>
		</form>
		</div>

		<div class="mt-20">
		    <c:if test="${!empty stats}">
			<table
				class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
                        <th width="150">日期</th>
                        <th width="100">配送员账号</th>
                        <th width="100">配送员名字</th>
                        <th width="100">所属分站</th>
                        <th width="100">5星订单数</th>
						<th width="100">4星订单数</th>
						<th width="100">3星及以下订单数</th>
						<th width="100">订单数小计</th>
						<th width="100">5星超时订单数</th>
						<th width="100">4星超时订单数</th>
						<th width="100">单价(5星)</th>
						<th width="100">单价(4星)</th>
						<th width="100">有效5星配送费</th>
						<th width="100">有效4星配送费</th>
						<th width="100">合计</th>
						<th width="200">操作</th>
					</tr>
				</thead>
				<tbody>
						<c:forEach items="${stats}" var="stat">
						
						<tr class="text-c">
                            <td>${stat.finish_time}</td>
                            <td>${stat.c_mob}</td>
                            <td>${stat.c_tname}</td>
                            <td>${stat.cityName}</td>
                            <td>${stat.five_remark_count}</td>
                            <td>${stat.four_remark_count}</td>
                            <td>${stat.less_three_remark_count}</td>
                            <td>${stat.order_count}</td>
                            <td>${stat.five_remark_overtime_count}</td>
                            <td>${stat.four_remark_overtime_count}</td>
                            <td>${stat.five_unit_price}</td>
                            <td>${stat.four_unit_price}</td>
                            <td>${(stat.five_remark_count - stat.five_remark_overtime_count) * stat.five_unit_price }</td>
                            <td>${(stat.four_remark_count - stat.four_remark_overtime_count) * stat.four_unit_price }</td>
                            <td>${(stat.five_remark_count - stat.five_remark_overtime_count) * stat.five_unit_price + (stat.four_remark_count - stat.four_remark_overtime_count) * stat.four_unit_price}</td>
                            
							<td class="td-manage">
								<a  class="label label-primary radius"
								onClick="t_shipping_edit(this,'${stat.user_id}','${stat.finish_time}')" href="javascript:void(0);"
								title="详情">详情</a>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			</c:if>
			<c:if test="${empty stats}">
				<h3>暂无数据</h3>
			</c:if>
			<div id="Pagination" class="page-con"></div>
		</div>
	</div>
	<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="lib/layer/1.9.3/layer.js"></script>
	<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
	<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript"
		src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="js/H-ui.js"></script>
	<script type="text/javascript" src="js/H-ui.admin.js"></script>
	<script type="text/javascript" src="js/jquery.pagination.js"></script>
	<script type="text/javascript">
	$(function() {
		initPager();
	});
	
	var showCount = ${pageInfo.showCount};
	var currentPage = ${pageInfo.currentPage-1};
	var totalResult = ${pageInfo.totalResult};
	function initPager(){
		$("#Pagination").pagination(totalResult, {
            callback: function(new_page_index, pagination_container){
            	var oldLocation = location.href;
            	var pa = "currentPage=" + (new_page_index+1);
        		var shoC = "showCount=" + showCount;
            	var index = oldLocation.lastIndexOf("?");
            	if (index == -1){
            		location.href = oldLocation + "?" + pa + "&" + shoC;
            	}else if (oldLocation.indexOf("currentPage") == -1){
            		location.href = oldLocation + "&" + pa;
            	}else if (oldLocation.indexOf("showCount") == -1){
            		location.href = oldLocation + "&" + shoC;
            	}else{
            		var temp = oldLocation.replace(/currentPage=\d+/, pa);
					var newLocation = temp.replace(/showCount=\d+/, shoC);
            		location.href = newLocation;
            	}
            	return false;
            },
            items_per_page:showCount, 
            load_first_page:false,
            prev_text:'上一页',
            next_text:'下一页',
            ellipse_text:'...',
            num_edge_entries:1,
            num_display_entries:5,
            current_page:currentPage,
        });
	}
		
	/*
	重置
	*/
	function theReset(){
		$("#search-form input[type='text']").val('');
		$("#search-form select").val(-1);
		$("#endType").val("-1");
	}
		
		/*详情*/
		function t_shipping_edit(obj,userId,finish_time){
			var edit_page = "<%=path%>/backstage/shipper_order_list?userId="+userId + "&finish_time=" + finish_time;
			layer_show("详情",edit_page);
		}

		/*立即派单*/
		function t_shipping_allocate(obj,id,title,w,h){
			var edit_page = "<%=path%>/backstage/Shippers_pd?shipping_id="+id+"&titles="+title+"&thetype=1";
			layer_show("立即派单",edit_page,w,h);
		}
		
		/*更改派单*/
		function Shippers_change_pd(obj,id,title,w,h){
			var edit_page = "<%=path%>/backstage/Shippers_change_pd?shipping_id="+id+"&titles="+title+"&thetype=1";
			layer_show("更改派单",edit_page,w,h);
		}
		
		
		
		if($("#status").val()==1){
			$("#one").css({"background":"#5a98de","border":"1px solid #5a98de"});
			$("#two").css({"background":"white","border":"1px solid black","color":"black"});
			$("#three").css({"background":"white","border":"1px solid black","color":"black"});
		}else if($("#status").val()==2){
			$("#one").css({"background":"white","border":"1px solid black","color":"black"});
			$("#two").css({"background":"#5a98de","border":"1px solid #5a98de"});
			$("#three").css({"background":"white","border":"1px solid black","color":"black"});
		}else{
			$("#one").css({"background":"white","border":"1px solid black","color":"black"});
			$("#two").css({"background":"white","border":"1px solid black","color":"black"});
			$("#three").css({"background":"#5a98de","border":"1px solid #5a98de"});
		}
		//选择状态
		$("#one").click(function(){
			$("#status").val(1);
			$("#form-list_byterm").submit();
			$("#one").css({"background":"#5a98de","border":"1px solid #5a98de"});
			$("#two").css({"background":"white","border":"1px solid black","color":"black"});
			$("#three").css({"background":"white","border":"1px solid black","color":"black"});
		});
		//选择状态
		$("#two").click(function(){
			$("#status").val(2);
			$("#form-list_byterm").submit();
			$("#one").css({"background":"white","border":"1px solid black","color":"black"});
			$("#two").css({"background":"#5a98de","border":"1px solid #5a98de"});
			$("#three").css({"background":"white","border":"1px solid black","color":"black"});
		});
		//选择状态
		$("#three").click(function(){
			$("#status").val(3);
			$("#form-list_byterm").submit();
			$("#one").css({"background":"white","border":"1px solid black","color":"black"});
			$("#two").css({"background":"white","border":"1px solid black","color":"black"});
			$("#three").css({"background":"#5a98de","border":"1px solid #5a98de"});
		});
	</script>
</body>
</html>



